﻿
using System.Text;
using System.IO;
using System.Xml;

namespace RWXMLEdit.Common
{
    public class StringWriterEx : StringWriter
    {
        private readonly Encoding _encoding;

        public StringWriterEx()
        {
            _encoding = Encoding.UTF8;
        }

        public StringWriterEx(Encoding encoding)
        {
            _encoding = encoding;
        }

        public StringWriterEx(StringBuilder stringBuilder):base(stringBuilder)
        {
            _encoding = Encoding.UTF8;
        }

        public StringWriterEx(Encoding encoding, StringBuilder stringBuilder) : base(stringBuilder)
        {
            _encoding = encoding;
        }

        public override Encoding Encoding
        {
            get { return _encoding; }
        }
    }
}
